package JUnit_tests;

import static org.junit.Assert.*;

import org.junit.Test;

public class distance_test {

	
	dk.StringDistances sd = new dk.StringDistances();
	
	
	@Test
	public void testLevenDistance(){

		assertEquals(1, sd.getLevenValue("dan", "dan1"));
		assertEquals(3, sd.getLevenValue("dan", "dan123"));
		assertEquals(4, sd.getLevenValue("dan", "fred"));
		assertEquals(1, sd.getLevenValue("dan", "Dan"));
	}
	
	
	
	@Test
	public void testGetLevenPercentVal(){
		assertEquals(50,sd.levenBasicWeb("Dan", "Dan123"));
		assertEquals(50,sd.getLevenPercentVal("Dan", "Dan123"));		
	
		assertEquals(0,sd.levenBasicWeb("Dan", "Dan"));
		assertEquals(0,sd.getLevenPercentVal("Dan", "Dan"));
	
	}

}
